﻿<%@ WebHandler Language="C#" Class="ListGroupNews" %>

using System;
using System.Web;

public class ListGroupNews : AdminHandler
{
    
    public override void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/plain";
        if (IsAuthenticate(context))
        {
            try
            {
                string result = "";
                GroupNews obj = new GroupNews();
                System.Collections.Generic.IList<GroupNews> list = obj.List();
                result = obj.ToJsonList<GroupNews>(list);
                context.Response.Write(result);
            }
            catch (Exception ex)
            {
                PMSA.Framework.Log.CLogManager.Write("ListGroupNews.ashx", ex.ToString(), "ADMIN");
                context.Response.Write("FAIL");
            }
        }
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}